package yangyongchao.com.howtousefastjson;

import android.content.Context;
import android.util.Log;

import java.io.IOException;

import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

/**
 * Created by yyc on 2018/2/2.
 */

public class Network {
    public static OkHttpClient client = new OkHttpClient();
    public static void get(String url,Callback callback){
        //创建一个Request
        final Request request = new Request.Builder()
                .url(url)
                .get()
                .build();
        client.newCall(request).enqueue(callback);
    }
}
